package com.demo.mybaits;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;

import com.demo.mybaits.filter.SeverletFilter;

@SpringBootApplication
public class MybaitsApplication {

	public static void main(String[] args) {
		SpringApplication.run(MybaitsApplication.class, args);
	}

	@Bean
    public FilterRegistrationBean<SeverletFilter> testFilterRegistration() {
        FilterRegistrationBean<SeverletFilter> registration = new FilterRegistrationBean<SeverletFilter>(new SeverletFilter());
        registration.addUrlPatterns("/*"); //
        registration.setName("severletFilter");
        return registration;
    }
	
}
